package com.meelive.ingkee.iknetwork.diagnose.model

import com.google.gson.annotations.SerializedName
import com.meelive.ingkee.base.utils.ProguardKeep
import java.util.*

data class IKNetworkDiagnoseResult(@SerializedName("dm_error") val code: Int = 0,
                                   @SerializedName("error_msg") val message: String? = null,
                                   @SerializedName("data") val data: IKNetworkDiagnoseConfig?) : ProguardKeep

class IKNetworkDiagnoseConfig : ProguardKeep {
    var cpu_freq = 0
    var nic_speed_interval = 0
    var ping_times = 0
    var ping_interval = 0
    var ping_list: List<String> = ArrayList()
    var trace_route_list: List<String> = ArrayList()
    var http_download_list: List<HttpList> = ArrayList()
    var http_upload_list: List<HttpList> = ArrayList()

    class HttpList : ProguardKeep {
        var url: String? = null
        var max_speed = 0
        var max_data_size = 0
        var max_duration = 0
        override fun toString(): String {
            return "HttpList{" +
                    "url='" + url + '\'' +
                    ", max_speed=" + max_speed +
                    ", max_data_size=" + max_data_size +
                    ", max_duration=" + max_duration +
                    '}'
        }
    }

    override fun toString(): String {
        return "NetwokDiagnoseConfig{" +
                "cpu_freq=" + cpu_freq +
                ", nic_speed_interval=" + nic_speed_interval +
                ", ping_times=" + ping_times +
                ", ping_interval=" + ping_interval +
                ", ping_list=" + ping_list +
                ", trace_route_list=" + trace_route_list +
                ", http_download_list=" + http_download_list +
                ", http_upload_list=" + http_upload_list +
                '}'
    }
}